<script setup>
import {useRoute} from 'vue-router';
import {useRootSetting} from "@/hooks/setting/useRootSetting.js";
import Item from "@/components/Item.vue";

const {menuList} = useRootSetting();
const route = useRoute();
const findMenuItem = menuList.value.menuList.map(item => (
    {
      meta: item.meta,
      name: item.name,
      path: item.path,
      redirect: item.redirect,
    }
))
</script>

<template>
  <el-menu class="horizontal-header-menu" default-active="/nested" ref="menu" mode="horizontal">
    <el-menu-item v-for="item in findMenuItem" :index="item.path">
      <Item
          class-name="menu-item-svg"
          mode="horizontal"
          :title="item.path"
      />
    </el-menu-item>
  </el-menu>
</template>